package com.redhat.auth.log.query;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.redhat.auth.log.core.domain.BizLogInfo;

public class LogQueryChannelImpl extends HibernateDaoSupport  implements LogQueryChannel {

	/**
	 * 根据传递过来的SQL,查询出对象
	 * @param criteria
	 * @return
	 */
	public List<Object> queryByCriteria(List<String> sqls){
		List listCriteria = new ArrayList();
		for(String sql:sqls){
			List findBySQL = this.getHibernateTemplate().find(sql);
			listCriteria.addAll(findBySQL);
		}
		return listCriteria;
	}
}
